package com.dubbo.controller;

import org.springframework.context.support.ClassPathXmlApplicationContext;

import com.dubbo.api.UserService;


public class Consumer {
	 public static void main(String[] args) throws Exception {
	        ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext(
	                new String[]{"classpath:dubbo-demo-consumer.xml"});
	        context.start();
	        UserService demoService = (UserService) context.getBean("userService"); // obtain proxy object for remote invocation
	        String hello = demoService.sayHello("1111111111111111asdasd"); // execute remote invocation
	        System.out.println(hello); // show the result
	    }
}